package com.websocket.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

/**
 * Created by simon on 5/22/17.
 */
@WebListener
public class BootStrapListener implements ServletContextListener {
    private static Logger logger = LoggerFactory.getLogger(BootStrapListener.class);

    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        String env = System.getProperty("env");
        logger.info("env:{}", env);

        logger.error("Test Error Log");
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
    }
}
